home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / t2win_32.zip / _ISX.FRM < prev    next >
Text File  |  1996-05-14  |  8KB  |  285 lines

  1. VERSION 4.00
  2. Begin VB.Form frmIsX 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "IsX"
  5.    ClientHeight    =   4485
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7485
  9.    Height          =   4890
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4485
  14.    ScaleWidth      =   7485
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2925
  17.    Width           =   7605
  18.    Begin Threed.SSPanel SSPanel2 
  19.       Align           =   2  'Align Bottom
  20.       Height          =   465
  21.       Left            =   0
  22.       TabIndex        =   1
  23.       Top             =   4020
  24.       Width           =   7485
  25.       _Version        =   65536
  26.       _ExtentX        =   13203
  27.       _ExtentY        =   820
  28.       _StockProps     =   15
  29.       BackColor       =   12632256
  30.       Begin VB.TextBox Text1 
  31.          Height          =   285
  32.          Left            =   1440
  33.          TabIndex        =   2
  34.          Tag             =   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  35.          Top             =   90
  36.          Width           =   5055
  37.       End
  38.       Begin VB.Label Label1 
  39.          Caption         =   "&Enter a test string"
  40.          Height          =   255
  41.          Left            =   90
  42.          TabIndex        =   4
  43.          Top             =   120
  44.          Width           =   1275
  45.       End
  46.       Begin Threed.SSCommand SSCommand2 
  47.          Height          =   285
  48.          Left            =   6570
  49.          TabIndex        =   3
  50.          Top             =   90
  51.          Width           =   825
  52.          _Version        =   65536
  53.          _ExtentX        =   1455
  54.          _ExtentY        =   503
  55.          _StockProps     =   78
  56.          Caption         =   "&Reset"
  57.          BevelWidth      =   1
  58.          Outline         =   0   'False
  59.       End
  60.    End
  61.    Begin Threed.SSPanel SSPanel1 
  62.       Align           =   1  'Align Top
  63.       Height          =   480
  64.       Left            =   0
  65.       TabIndex        =   5
  66.       Top             =   0
  67.       Width           =   7485
  68.       _Version        =   65536
  69.       _ExtentX        =   13203
  70.       _ExtentY        =   847
  71.       _StockProps     =   15
  72.       ForeColor       =   -2147483640
  73.       BackColor       =   12632256
  74.       Begin VB.ComboBox cmb_Function 
  75.          Height          =   315
  76.          Left            =   1365
  77.          TabIndex        =   6
  78.          Top             =   90
  79.          Width           =   4785
  80.       End
  81.       Begin Threed.SSCommand cmdNP 
  82.          Height          =   300
  83.          Index           =   1
  84.          Left            =   7140
  85.          TabIndex        =   10
  86.          Top             =   90
  87.          Width           =   255
  88.          _Version        =   65536
  89.          _ExtentX        =   450
  90.          _ExtentY        =   529
  91.          _StockProps     =   78
  92.          Caption         =   ">"
  93.          BevelWidth      =   1
  94.          Font3D          =   3
  95.          RoundedCorners  =   0   'False
  96.          Outline         =   0   'False
  97.       End
  98.       Begin Threed.SSCommand cmdNP 
  99.          Height          =   300
  100.          Index           =   0
  101.          Left            =   6300
  102.          TabIndex        =   9
  103.          Top             =   90
  104.          Width           =   255
  105.          _Version        =   65536
  106.          _ExtentX        =   450
  107.          _ExtentY        =   529
  108.          _StockProps     =   78
  109.          Caption         =   "<"
  110.          BevelWidth      =   1
  111.          Font3D          =   3
  112.          RoundedCorners  =   0   'False
  113.          Outline         =   0   'False
  114.       End
  115.       Begin VB.Label Label2 
  116.          Caption         =   "&Select a function"
  117.          Height          =   255
  118.          Left            =   90
  119.          TabIndex        =   8
  120.          Top             =   120
  121.          Width           =   1275
  122.       End
  123.       Begin Threed.SSCommand SSCommand1 
  124.          Default         =   -1  'True
  125.          Height          =   300
  126.          Left            =   6615
  127.          TabIndex        =   7
  128.          Top             =   90
  129.          Width           =   465
  130.          _Version        =   65536
  131.          _ExtentX        =   820
  132.          _ExtentY        =   529
  133.          _StockProps     =   78
  134.          Caption         =   "&Go"
  135.          BevelWidth      =   1
  136.          RoundedCorners  =   0   'False
  137.          Outline         =   0   'False
  138.       End
  139.    End
  140.    Begin VB.Label lbl_Result 
  141.       Appearance      =   0  'Flat
  142.       BackColor       =   &H80000005&
  143.       BackStyle       =   0  'Transparent
  144.       ForeColor       =   &H80000008&
  145.       Height          =   3270
  146.       Left            =   90
  147.       TabIndex        =   0
  148.       Top             =   630
  149.       Width           =   7305
  150.    End
  151. End
  152. Attribute VB_Name = "frmIsX"
  153. Attribute VB_Creatable = False
  154. Attribute VB_Exposed = False
  155. Option Explicit
  156. Option Base 1
  157.  
  158. Private Const Iteration = 250
  159.  
  160. Dim IsLoaded         As Integer
  161.  
  162. Dim TimerStartOk     As Integer
  163. Dim TimerCloseOk     As Integer
  164.  
  165. Dim TimerHandle      As Integer
  166. Dim TimerValue       As Long
  167.  
  168. Private Sub cmdNP_Click(Index As Integer)
  169.  
  170.    Call sub_NextPrev(cmb_Function, Index)
  171.  
  172. End Sub
  173.  
  174.  
  175. Private Sub cmb_Function_Click()
  176.    
  177.    If (IsLoaded = False) Then Exit Sub
  178.    
  179.    Call cDisableFI(mdiT2W.Picture1)
  180.    
  181.    lbl_Result = ""
  182.    
  183.    DoEvents
  184.    
  185.    Select Case cmb_Function.ListIndex
  186.       Case 0
  187.          Call TestIsX
  188.    End Select
  189.  
  190.    DoEvents
  191.    Call cEnableFI(mdiT2W.Picture1)
  192.    
  193. End Sub
  194.  
  195.  
  196. Private Sub Form_Activate()
  197.  
  198.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  199.  
  200. End Sub
  201.  
  202. Private Sub Form_Load()
  203.  
  204.    IsLoaded = False
  205.    
  206.    Show
  207.  
  208.    Text1.Text = Text1.Tag + LCase$(Text1.Tag)
  209.  
  210.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_isx.t2w")
  211.    
  212.    IsLoaded = True
  213.    
  214. End Sub
  215.  
  216. Private Sub SSCommand1_Click()
  217.    
  218.    Call cmb_Function_Click
  219.    
  220. End Sub
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228. Private Sub TestIsX()
  229.  
  230.    Dim intResult        As Integer
  231.    Dim strResult        As String
  232.    Dim strDisplay       As String
  233.    
  234.    Dim i                As Integer
  235.    
  236.    Dim Str1             As String
  237.    
  238.    strResult = ""
  239.    strDisplay = ""
  240.    
  241.    Str1 = Text1.Text
  242.  
  243.    strDisplay = "[" & Str1 & "] is " & vbCrLf & vbCrLf
  244.  
  245.    strDisplay = strDisplay & IIf(cIsDigit(Str1), "Digit", " not Digit") & vbCrLf
  246.    strDisplay = strDisplay & IIf(cIsXdigit(Str1), "XDigit", " not XDigit") & vbCrLf
  247.    strDisplay = strDisplay & IIf(cIsAlpha(Str1), "Alpha", " not Alpha") & vbCrLf
  248.    strDisplay = strDisplay & IIf(cIsLower(Str1), "Lower", " not Lower") & vbCrLf
  249.    strDisplay = strDisplay & IIf(cIsUpper(Str1), "Upper", " not Upper") & vbCrLf
  250.    strDisplay = strDisplay & IIf(cIsAlnum(Str1), "Alnum", " not Alnum") & vbCrLf
  251.    strDisplay = strDisplay & IIf(cIsUpper(Str1), "Upper", " not Upper") & vbCrLf
  252.    strDisplay = strDisplay & IIf(cIsSpace(Str1), "Space", " not Space") & vbCrLf
  253.    strDisplay = strDisplay & IIf(cIsPunct(Str1), "Punct", " not Punct") & vbCrLf
  254.    strDisplay = strDisplay & IIf(cIsAscii(Str1), "Ascii", " not Ascii") & vbCrLf
  255.    strDisplay = strDisplay & IIf(cIsCsym(Str1), "Csym", " not Csym") & vbCrLf
  256.    strDisplay = strDisplay & IIf(cIsCsymf(Str1), "Csymf", " not Csymf") & vbCrLf
  257.    strDisplay = strDisplay & IIf(cIsISBN(Str1), "ISBN", " not ISBN") & vbCrLf & vbCrLf
  258.      
  259.    lbl_Result = strDisplay
  260.  
  261.    'time the function
  262.  
  263.    TimerHandle = cTimerOpen()
  264.    TimerStartOk = cTimerStart(TimerHandle)
  265.    
  266.    For i = 1 To Iteration
  267.       intResult = cIsDigit(Str1)
  268.    Next i
  269.    
  270.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  271.    
  272.    TimerCloseOk = cTimerClose(TimerHandle)
  273.  
  274. End Sub
  275.  
  276. Private Sub SSCommand2_Click()
  277.    
  278.    Text1.Text = Text1.Tag + LCase$(Text1.Tag)
  279.    
  280.    Call SSCommand1_Click
  281.    
  282. End Sub
  283.  
  284.  
  285.